# 协程切换与返回
from greenlet import greenlet


def test1(x, y):
    z = gr2.switch(x + y)
    print('test1', z)
    return z


def test2(u):
    print('test2', u)
    gr1.switch(10)


gr1 = greenlet(test1)
gr2 = greenlet(test2)

result = gr1.switch("hello", " world")
print(result)
